import request from '@/utils/request'

export function login(data) {
    return request({
        url: 'jeecg-boot/sys/login',
        method: 'POST',
        data
    })
}

export function getCode(params,b) {
    return request({
        url:`jeecg-boot/sys/randomImage/` + b,
        method:'GET',
        params
    })
}
//用户管理
export function getuser(params) {
    return request({
        url:`jeecg-boot/sys/user/list`,
        method:'GET',
        params
    })
}

export function delUser(params) {
    return request({
        url:`jeecg-boot/sys/user/delete`,
        method:'DELETE',
        params
    })
}

//角色管理
export function getrole(params) {
    return request({
        url:`jeecg-boot/sys/role/list`,
        method:'GET',
        params
    })
}

export function delRole(params) {
    return request({
        url:`jeecg-boot/sys/role/delete`,
        method:'DELETE',
        params
    })
}

// 新增接口
export function newRole(data) {
    return request({
        url:`jeecg-boot/sys/role/add`,
        method:'POST',
        data
    })
}
export function editRole(data) {
    return request({
        url:`jeecg-boot/sys/role/edit`,
        method:'PUT',
        data
    })
}
//菜单管理
export function getper(params) {
    return request({
        url:`jeecg-boot/sys/permission/list`,
        method:'GET',
        params
    })
}
//系统通告
export function getann(params) {
    return request({
        url:`jeecg-boot/sys/annountCement/list`,
        method:'GET',
        params
    })
}

//模板管理
export function gettemp(params) {
    return request({
        url:`jeecg-boot/message/sysMessageTemplate/list`,
        method:'GET',
        params
    })
}

//消息管理
export function getList(params) {
    return request({
        url:`jeecg-boot/message/sysMessage/list`,
        method:'GET',
        params
    })
}